package com.task.core.mapper;

import java.util.List;
import java.util.Map;

import com.task.core.domain.DataOperationInfo;
import com.task.core.dto.request.info.HistoryDataDetailInfo;
import com.task.core.dto.response.MissionHistoryDetailResposeDTO;
import com.task.core.vo.resp.DataContentDetailRespVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.core.domain.DataSendHistoryInfo;
import com.task.core.domain.MissionSendHistoryInfo;
import com.task.core.dto.request.DataSendDetailRequestDTO;
import com.task.core.dto.request.MissionSendDetailRequestDTO;
import com.task.core.dto.request.info.HistoryDataSearchInfo;

/**
 * @author 迪迦.
 * @date 2024/12/27 10:34
 */
@Mapper
public interface SendHistoryMapper {

  List<String> getIndexTableNameByPrefix(@Param("prefix") String prefix);

  List<DataSendHistoryInfo> getDataSendDetailHistory(
      @Param("request") DataSendDetailRequestDTO request,
      @Param("missionCodes") List<String> missionCodes,
      @Param("searchTableList") List<HistoryDataSearchInfo> searchTableList
  );

  List<MissionSendHistoryInfo> getMissionSendDetailHistory(
      @Param("missionCodes") List<String> missionCodes,
      @Param("searchTableList") List<HistoryDataSearchInfo> searchTableList,
      @Param("request") MissionSendDetailRequestDTO request);

  List<String> getDataForHistory(DataSendDetailRequestDTO request);

  List<String> getMissionForHistory(MissionSendDetailRequestDTO request);

  List<MissionHistoryDetailResposeDTO> getMissionSendHistoryByTimeType(@Param("searchInfo") List<HistoryDataSearchInfo> searchInfo,
                                                                       @Param("missionCode") String missionCode);

  List<DataSendHistoryInfo> getDataSendInfosByMissionCode(@Param("missionSendCode") String missionSendCode,
      @Param("tableName") List<String> tableName);

  Integer getDataContentMaxId(@Param("dataTables") List<String> dataTables);

  Integer getSendDetailMaxId(@Param("table") String table);

    void updateMissionHistoryaDetailIsDisplay(@Param("searchTableList") List<HistoryDataSearchInfo> searchTableList);

  String getDataIdsByCode(@Param("code")String code, @Param("tableName")String tableName);

  List<DataOperationInfo> getDataContent(@Param("tableNameAndDataIds") List<HistoryDataDetailInfo> tableNameAndDataIds);
}
